package net.mapper;

import net.pojo.*;
import org.apache.ibatis.annotations.Param;


import java.util.List;

/**
 * @Author admin
 * @Date 2019/4/9 8:16
 */
public interface OrderMapper {
    List<Order> findAll();
    //通过Id找订单（订单包含详情）
    Order findByOrderId(String id);
    List<Order> search(OrderVo orderVo);
    List<Download> findItemByOid(DateVo dateVo);
    List<Orderitems> findItemByOrdersid(@Param("order") List<Order> order);
    List<Order> findByDayInInterval(String day);
    int  createOrders(Order order);

    int createOrderItems(@Param(value = "orderitems") List<Orderitems> orderitems);
    List<Order> findByUid(Integer uid);

    int updatePayState(@Param(value = "id") String out_trade_no,
                       @Param(value = "state") Integer state);

    int deleteById(@Param(value = "id") String id);

}
